//
//  BaseTableViewController.m
//  RongChuang
//
//  Created by yzk on 15/4/8.
//  Copyright (c) 2015年 cooperlink. All rights reserved.
//

#import "BaseTableViewController.h"

@implementation BaseTableViewController

- (void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
    [[UIApplication sharedApplication] setStatusBarHidden:NO];
}

-(void)viewDidLoad
{
    [super viewDidLoad];
    
    self.navigationController.navigationBarHidden=NO;
    self.navigationController.navigationBar.barTintColor=[UIColor colorWithHexString:@"#063586"];
    [self.navigationController.navigationBar setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[UIColor whiteColor],NSForegroundColorAttributeName, [UIFont boldSystemFontOfSize:20],NSFontAttributeName,nil]];
    self.navigationItem.leftBarButtonItem=[[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"navi_back_normal"] style:UIBarButtonItemStylePlain target:self action:@selector(backEvent:)];
    [self.navigationItem.leftBarButtonItem setTintColor:[UIColor whiteColor]];

    self.view.backgroundColor = [UIColor colorWithHexString:@"#edeeef"];
    self.clearsSelectionOnViewWillAppear = YES;

    if (IsIOS7) {
        self.edgesForExtendedLayout                         = UIRectEdgeNone;
        self.extendedLayoutIncludesOpaqueBars               = NO;
        self.modalPresentationCapturesStatusBarAppearance   = NO;
        self.navigationController.navigationBar.translucent = NO;
        self.automaticallyAdjustsScrollViewInsets           = NO;
    }
}

#pragma mark --返回事件
-(void)backEvent:(UIBarButtonItem *)paramItem
{
    [self.navigationController popViewControllerAnimated:YES];
}

@end
